import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * @Author: linzp
 * @Date: 2022/10/25/16:46
 */
public class demoFileStream {
    public static void main(String[] args) {
        List<String> salesCodeList = new ArrayList<>();
        List<String> salesCodeList2 = new ArrayList<>();
        salesCodeList.add("YD4G01-056-1-5");
        salesCodeList.add("YD4G01-056-1-4");
        salesCodeList.add("YD4G01-056-1-9");

        salesCodeList2.add("YD4G01-056-1-4");
        salesCodeList2.add("YD4G01-056-1-5");
        salesCodeList2.add("YD4G01-056-1-7");
        salesCodeList2.add("YD4G01-056-1-8");
        Set<String> salesCodeSet = new HashSet<>(salesCodeList);
//        System.out.println(salesCodeSet.contains("YD4G01-056-1-4"));
//        System.out.println(salesCodeList);
        System.out.println(salesCodeList2.containsAll(salesCodeList));

//                fileReadStream();
    }

    public static void fileReadStream() {
        try (BufferedInputStream bis = new BufferedInputStream(new FileInputStream("D:\\haishengpeople.txt"))) {
            byte[] bytes = new byte[1024];
            int len;
            while ((len = bis.read(bytes)) != -1) {
                System.out.println(new String(bytes, 0, len));
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

}
